use std::env;
use std::process;
mod config;
pub fn main() {

    let args: Vec<String> = env::args().collect();
    let config = config::Config::new(&args).unwrap_or_else(|err| {
        println!("Problem parsing arguments: {}", err);
        process::exit(1);
    });
    
   println!("{},{}", config.query,config.filename);
   if let Err(e) = minigrep::run(config){
     println!("Problem read txt : {}", err);
        process::exit(1);
   }
}
